//
//  ViewController.m
//  wifiAuthTest
//
//  Created by yiban on 16/1/21.
//  Copyright © 2016年 yiban. All rights reserved.
//

#import "ViewController.h"
//#import "YBKit.h"
//#import "YBLib.h"
#import <YBCoreSDK/YBCoreSDK.h>
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    
//    UIImageView *imgView=[[UIImageView alloc] initWithFrame:CGRectMake(50, 250, 150, 150)];
//    UIImage *image = [UIImage imageNamed:@"YBWifiAuthBundle.bundle/yiban_icon"];
//    [imgView setImage:image];
//    [self.view addSubview:imgView];
    
    // Do any additional setup after loading the view, typically from a nib.
    UIButton *hotAppBtn = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 50, 50)];
    hotAppBtn.backgroundColor =[UIColor blackColor];
    [hotAppBtn setTitle:@"热门" forState:UIControlStateNormal];
    [hotAppBtn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:hotAppBtn];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)btnClick:(id)sender
{
    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
//    [dict setValue:@"18521301861" forKey:@"account"];
//    [dict setValue:@"106606179" forKey:@"passwd"];
    [dict setValue:@"18521301861" forKey:@"phone"];
     [dict setValue:@"1" forKey:@"kind"];
//    [dict setValue:@"5bebda7148ac1ae23521650478286304" forKey:@"access_token"];
    
//    [[YBAuthApi sharedYBAuthApi] loginWithParams:dict success:^(NSDictionary *data) {
//        
//        NSLog(@"===%@=====",data);
//    } error:^(NSError *status) {
//        
//    }];
    
//    [[YBAuthApi sharedYBAuthApi] logoutWithParams:dict success:^(YBAuthInfo *authInfo) {
//        
//    } error:^(YBErrorCode status) {
//        
//    }];
//    [[YBAuthApi sharedYBAuthApi] getPhoneAuthCodeWithParamter:dict completion:^(id response, NSError *error) {
//        NSLog(@"%@",response);
//    }];
//    
//    YBAuthNavigationController *auth = [YBAuthNavigationController newWithAuthDelegate:self];
//    [self presentViewController:auth animated:YES completion:nil];
    
    [YBCoreShare setDebug:YES];
    [[YBApi sharedYBApi] test];
    
}
-(void)userLoginOK:(id)userinfo
{
    
}
@end
